<template>
  <div id="index">
    <el-menu
    :default-active="defaultActive"
    class="el-menu-demo"
    mode="horizontal"
    @select="handleSelect"
    background-color="#545c64"
    text-color="#fff"
    router
    active-text-color="#ffd04b"
    >
      <el-menu-item index="/student">学生数据信息</el-menu-item>
      <el-menu-item index="/userinfo">用户信息</el-menu-item>
    </el-menu>
    <router-view></router-view>
  </div>
</template>
<script>
export default {
  name: 'Index',
  data () {
    return {
      defaultActive: '/student'
    }
  },
  methods: {
    handleSelect (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
